|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | TIMER_A_PERIOD 250 |
| #define | DUTY_CYCLE 250 |
Functions | |
| void | main (void) |
| #define DUTY_CYCLE 250 |
Definition at line 64 of file timer_a_ex6_upDownModeOperation.c.
| #define TIMER_A_PERIOD 250 |
Toggle P2.4 using hardware TA1.0 output. Timer1_A is configured for up/down mode with CCR0 defining period, TA1.0 also output on P2.4. In this example, CCR0 is loaded with 250 and TA1.0 will toggle P2.4 at TACLK/2*250. Thus the output frequency on P2.4 will be the TACLK/1000. No CPU or software resources required. As coded with TACLK = SMCLK, P2.4 output frequency is ~1.045M/1000. SMCLK = MCLK = TACLK = default DCO ~1.045MHz
| / | | |
|---|---|
| – | RST |
| | | P2.4/TA1.0|--> SMCLK/1000
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 63 of file timer_a_ex6_upDownModeOperation.c.
| void main | ( | void | ) |
Definition at line 66 of file timer_a_ex6_upDownModeOperation.c.
References __no_operation(), DUTY_CYCLE, and TIMER_A_PERIOD.